package com.project.bean;

import java.util.List;

public class CutPageBean<T> {
    //页码数据
    private List<T> list;
    //总记录数
    private int num;
    //总页数
    private int totalPage;
    //每页显示记录数
    public static final int pageSize=3;

    public List<T> getList() {
        return list;
    }

    public void setList(List<T> list) {
        this.list = list;
    }

    public int getNum() {
        return num;
    }

    public void setNum(int num) {
        this.num = num;
        this.setTotalPage(this.num%CutPageBean.pageSize == 0? this.num/CutPageBean.pageSize:
                this.num/CutPageBean.pageSize+1);
    }

    public int getTotalPage() {
        return totalPage;
    }

    public void setTotalPage(int totalPage) {
        this.totalPage = totalPage;
    }

    @Override
    public String toString() {
        return "CutPageBean{" +
                "list=" + list +
                ", num=" + num +
                ", totalPage=" + totalPage +
                '}';
    }
}
